import request from '@/utils/request'

// 获取消息列表
export const getMessages = (params) => request.get('/api/messages', params)

// 获取消息详情
export const getMessageDetail = (id) => request.get(`/api/messages/${id}`)

// 标记消息已读
export const markMessageRead = (id) => request.put(`/api/messages/${id}/read`)

// 批量标记已读
export const markAllMessagesRead = () => request.put('/api/messages/read-all')

// 删除消息
export const deleteMessage = (id) => request.delete(`/api/messages/${id}`)

// 获取未读消息数量
export const getUnreadCount = () => request.get('/api/messages/unread-count')